CD /D %~dp0

set siteUrl=http://localhost

if not "%1"=="" (
   set siteUrl=%1
)

SET FeaturePath=SdcSimpleContentFeature\
copy %FeaturePath%\ContentStructure.xml %FeaturePath%\ContentStructureInstall.xml

echo Replace Placeholders

SET SCRIPTPATH=%~dp0
SET REPLACERPATH=..\..\Resources\
SET REPLACERCONFIGFILEPATH=
SET REPLACER=%REPLACERPATH%DE.Sdc.Tools.Replacer.Console.exe
SET REPLACERCONFIGFILE=ReplacerConfigurationCommandLine.xml

cd %SCRIPTPATH%
call "%REPLACER%" "%REPLACERCONFIGFILEPATH%%REPLACERCONFIGFILE%" 

echo Install ContentStructure
REM PAUSE

"..\..\Resources\DE.Sdc.SharePoint.Common.ContentStructureImporterConsole.exe" %FeaturePath%\ContentStructureInstall.xml %siteUrl%

del %FeaturePath%\ContentStructureInstall.xml

REM PAUSE



